Skip to content

Conversation

@scop
Copy link
Contributor

@scop scop commented Aug 6, 2025

See individual commits for details.

scop added 2 commits August 6, 2025 16:29
Split over multiple lines, order entries alphabetically, avoid
unnecessary capturing groups for tiny performance gain.

Moves NOSONAR to inside the "correct" set of parenthesis, with no
functional effect though.
https://github.com/securego/gosec#annotating-code

Incidentally, #nosec was already mostly treated as a comment directive
due to another check done after the regex match. This just makes it
explicit and adds related test cases.

Some versions of gosec also support the //gosec:disable directive,
but that's quite well hidden in docs compared to //#nosec.
Copy link
Owner

@mvdan mvdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Appreciate the commit messages.

@mvdan mvdan merged commit 1b2d8f3 into mvdan:master Aug 12, 2025
6 checks passed
@ldez ldez mentioned this pull request Sep 2, 2025
ldez added a commit to ldez/gofumpt that referenced this pull request Sep 4, 2025
Restore previous directive regexp expectations.

Related to mvdan#327
Fixes mvdan#331
ldez added a commit to ldez/gofumpt that referenced this pull request Sep 4, 2025
Restores previous directive regexp expectations.

Related to mvdan#327
Fixes mvdan#331
ldez added a commit to ldez/gofumpt that referenced this pull request Sep 4, 2025
Restores previous directive regexp expectations.

Related to mvdan#327
Fixes mvdan#331
ldez added a commit to ldez/gofumpt that referenced this pull request Sep 4, 2025
Restores previous directive regexp expectations.

Related to mvdan#327
Fixes mvdan#331
ldez added a commit to ldez/gofumpt that referenced this pull request Sep 4, 2025
Restores previous directive regexp expectations.

Related to mvdan#327
Fixes mvdan#331
mvdan pushed a commit that referenced this pull request Sep 4, 2025
Restores previous directive regexp expectations.

Related to #327.
Fixes $331.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants